//
//  KXSearchBar.swift
//  开心微博
//
//  Created by 郑开心 on 15/12/6.
//  Copyright © 2015年 郑开心. All rights reserved.
//

import UIKit

class KXSearchBar: UITextField {

    override init(frame: CGRect) {
        super.init(frame: frame)
        self.font = UIFont.systemFontOfSize(13)
        self.background = UIImage.imageWithStretchableName("searchbar_textfield_background")
        let imageView = UIImageView(image: UIImage(named: "searchbar_textfield_search_icon"))
        imageView.width += 10
        imageView.contentMode = UIViewContentMode.Center
        self.leftView = imageView
        self.leftViewMode = UITextFieldViewMode.Always
        
    }

    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }

}
